<%@ page pageEncoding="UTF-8"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.base.DatabaseObject"%>
<%@page import="java.math.BigDecimal"%>
<%@include file="inc-header.jsp"%><!-- MAIN CONTENT -->
<div class="box bottom10">
	<%@include file="inc-nav-header.jsp"%>
	<div class="box bottom10 clearfix">
		<ul class="list-dot">
			<li>
				<img src="images/icon-list.png" alt="" width="5" height="5" />
				<a href="#"><strong>Winplay Online</strong>
				</a>: Mạng xã hội HOT nhất trên Mobile hiện nay <a href= "">Tải về >> </a>
			</li>
			<li>
				<img src="images/icon-list.png" alt="" width="5" height="5" />
				<a href="#"><strong> Đào Vàng Online </strong>
				</a>: Game kinh điển số 1 Việt nam lần đầu tiền xuất hiện trên Mobile <a href= "">Tải về >> </a>
			</li>
			<li>
				<img src="images/icon-list.png" alt="" width="5" height="5" />
				<a href="#"><strong> Audition Online </strong>
				</a>: HOT nhất hiện nay <a href= "">Tải về >> </a>
			</li>
		</ul>
	</div>
	<!--end .box-->

	<div class="box bottom10 clearfix line">
		<div class="title-normal">
			<h3 class="bg">
				<a href="game.jsp?act=dv" style="font-weight: bold;"> <img src="images/icon-game.png" alt="game" width="20" height="20" border="0" align="left" />&nbsp;<u>Game hay >></u></a>
			</h3>
		</div>
		<!--end .title-normal-->

		<div class="table">
			<%ArrayList<DatabaseObject> gameList = contentDAO.getContentListByType(new BigDecimal("1065"), 1, 6);
			if (gameList != null && !gameList.isEmpty()) {%>
			<table cellpadding="0" cellspacing="0" border="1" width="100%">
			<%
				for (DatabaseObject game : gameList) {%>
				<tr>
					<td width="4%" style="padding: 2px;">
				        <a href="game-detail.jsp?act=dv&catid=<%=game.getAttribute().get("category_id") %>&id=<%=game.getAttribute().get("id") %>&page=1"><img src="<%=imagePath + game.getAttribute().get("avatar_image") %>" alt="<%=game.getAttribute().get("name") %>" class="img-45-30"></a>
				    </td>
				    <td width="96%" style="vertical-align: top; padding: 5px 2px 5px 4px;">
				        <b><a href="game-detail.jsp?act=dv&catid=<%=game.getAttribute().get("category_id") %>&id=<%=game.getAttribute().get("id") %>&page=1"><strong> <%=game.getAttribute().get("name") %> </strong></a></b>
					<%
					dichden = getSevicesCode(Integer.parseInt(game.getAttribute().get("money").toString()));
					String ua=request.getHeader("User-Agent").toLowerCase();
					if(ua != null){
						ua = ua.toUpperCase();
					}
					if(ua.indexOf("NOKIA") >= 0 || ua.indexOf("SAMSUNG") >= 0 || ua.indexOf("MOTOROLA") >= 0 || ua.indexOf("APPLE") >=0 || ua.indexOf("ANDROID") >=0 || ua.indexOf("IPHONE") >= 0 || ua.indexOf("IPAD") >= 0){
			   		%>
			   		<p>Để <a href="sms:<%=dichden %>?body=<%=game.getAttribute().get("code") %>">Tải về <img src=<%=downloadIcon %>></a> soạn tin: <b class="show"><%=game.getAttribute().get("code")%></b> gửi <b class="show"><%=dichden %></b></p>
			   		<%} 
			   		else
			   		{%>
			   		<p>Để tải về soạn tin: <b class="show"><%=game.getAttribute().get("code")%></b> gửi <b class="show"><%=dichden %></b></p>
					<%}%>
				    </td>
				</tr>
				<%}%>
			</table>
			<%}%>
		</div>
		<!--end .table-->

	</div>
	<!--end .box-->
	<div class="box bottom10 clearfix line">
		<div class="title-normal">
			<h3 class="bg">
				<a href="clip.jsp?act=dv" style="font-weight: bold;"> <img src="images/icon-videoclip.png" alt="VidepClip" width="20" height="20" border="0" align="left" />&nbsp;<u>Video Clip >></u></a>
			</h3>
		</div>
		<!--end .title-normal-->

		<div class="table">
			<% gameList = contentDAO.getContentListByType(new BigDecimal("1067"), 1, 6);
			if (gameList != null && !gameList.isEmpty()) {%>
			<table cellpadding="0" cellspacing="0" border="1" width="100%">
			<%
				for (DatabaseObject game : gameList) {%>
				<tr>
					<td width="4%" style="padding: 2px;">
				        <a href="clip-detail.jsp?act=dv&catid=<%=game.getAttribute().get("category_id") %>&id=<%=game.getAttribute().get("id") %>&page=1"><img src="<%=imagePath + game.getAttribute().get("avatar_image") %>" alt="<%=game.getAttribute().get("name") %>" class="img-45-30"></a>
				    </td>
				    <td width="96%" style="vertical-align: top; padding: 5px 2px 5px 4px;">
				        <b><a href="clip-detail.jsp?act=dv&catid=<%=game.getAttribute().get("category_id") %>&id=<%=game.getAttribute().get("id") %>&page=1"><strong> <%=game.getAttribute().get("name") %> </strong></a></b>
					<%
					dichden = getSevicesCode(Integer.parseInt(game.getAttribute().get("money").toString()));
					String ua=request.getHeader("User-Agent").toLowerCase();
					if(ua != null){
						ua = ua.toUpperCase();
					}
					if(ua.indexOf("NOKIA") >= 0 || ua.indexOf("SAMSUNG") >= 0 || ua.indexOf("MOTOROLA") >= 0 || ua.indexOf("APPLE") >=0 || ua.indexOf("ANDROID") >=0 || ua.indexOf("IPHONE") >= 0 || ua.indexOf("IPAD") >= 0){
					%>
					<p>Để <a href="sms:<%=dichden %>?body=<%=game.getAttribute().get("code") %>">Tải về <img src=<%=downloadIcon %>></a> soạn tin: <b class="show"><%=game.getAttribute().get("code")%></b> gửi <b class="show"><%=dichden %></b></p>
			   		<%} 
			   		else
			   		{%>
			   		<p>Để tải về soạn tin: <b class="show"><%=game.getAttribute().get("code")%></b> gửi <b class="show"><%=dichden %></b></p>
					<%}%>
				    </td>
				</tr>
				<%}%>
			</table>
			<%}%>
		</div>
		<!--end .table-->

	</div>
	<!--end .box-->
	<div class="box bottom10 clearfix line">
		<div class="title-normal">
			<h3 class="bg">
				<a href="app.jsp?act=dv" style="font-weight: bold;"> <img src="images/icon_application.png" alt="Ứng dụng" width="20" height="20" border="0" align="left" />&nbsp;<u>Ứng dụng HOT >></u></a>
			</h3>
		</div>
		<!--end .title-normal-->

		<div class="table">
			<% gameList = contentDAO.getContentListByType(new BigDecimal("1070"), 1, 3);
			if (gameList != null && !gameList.isEmpty()) {%>
			<table cellpadding="0" cellspacing="0" border="1" width="100%">
			<%
				for (DatabaseObject game : gameList) {%>
				<tr>
					<td width="4%" style="padding: 2px;">
				        <a href="app-detail.jsp?act=dv&catid=<%=game.getAttribute().get("category_id") %>&id=<%=game.getAttribute().get("id") %>&page=1"><img src="<%=imagePath + game.getAttribute().get("avatar_image") %>" alt="<%=game.getAttribute().get("name") %>" class="img-45-30"></a>
				    </td>
				    <td width="96%" style="vertical-align: top; padding: 5px 2px 5px 4px;">
				        <b><a href="app-detail.jsp?act=dv&catid=<%=game.getAttribute().get("category_id") %>&id=<%=game.getAttribute().get("id") %>&page=1"><strong> <%=game.getAttribute().get("name") %> </strong></a></b>
					<%
					dichden = getSevicesCode(Integer.parseInt(game.getAttribute().get("money").toString()));
					String ua=request.getHeader("User-Agent").toLowerCase();
					if(ua != null){
						ua = ua.toUpperCase();
					}
					if(ua.indexOf("NOKIA") >= 0 || ua.indexOf("SAMSUNG") >= 0 || ua.indexOf("MOTOROLA") >= 0 || ua.indexOf("APPLE") >=0 || ua.indexOf("ANDROID") >=0 || ua.indexOf("IPHONE") >= 0 || ua.indexOf("IPAD") >= 0){
					%>
					<p>Để <a href="sms:<%=dichden %>?body=<%=game.getAttribute().get("code") %>">Tải về <img src=<%=downloadIcon %>></a> soạn tin: <b class="show"><%=game.getAttribute().get("code")%></b> gửi <b class="show"><%=dichden %></b></p>
					<%} 
					else
					{%>
					<p>Để tải về soạn tin: <b class="show"><%=game.getAttribute().get("code")%></b> gửi <b class="show"><%=dichden %></b></p>
					<%}%>
				    </td>
				</tr>
				<%}%>
			</table>
			<%}%>
		</div>
		<!--end .table-->

	</div>
	<!--end .box-->
	<div class="box bottom10 clearfix line">
		<div class="title-normal">
			<h3 class="bg">
				<a href="tone.jsp?act=dv" style="font-weight: bold;"> <img src="images/icon-music1.png" alt="Nhạc HOT " width="23" height="15" border="0" align="left" />&nbsp;<u>Nhạc HOT >></u></a>
			</h3>
		</div>
		<!--end .title-normal-->

		<div class="table">
			<% gameList = contentDAO.getContentListByType(new BigDecimal("1068"), 1, 3);
			if (gameList != null && !gameList.isEmpty()) {%>
			<table cellpadding="0" cellspacing="0" border="1" width="100%">
			<%
				for (DatabaseObject game : gameList) {%>
				<tr>
					<td width="4%" style="padding: 2px;">
				        <a href="tone-detail.jsp?act=dv&catid=<%=game.getAttribute().get("category_id") %>&id=<%=game.getAttribute().get("id") %>&page=1"><img src="<%=imagePath + game.getAttribute().get("avatar_image") %>" alt="<%=game.getAttribute().get("name") %>" class="img-45-30"></a>
				    </td>
				    <td width="96%" style="vertical-align: top; padding: 5px 2px 5px 4px;">
				        <b><a href="tone-detail.jsp?act=dv&catid=<%=game.getAttribute().get("category_id") %>&id=<%=game.getAttribute().get("id") %>&page=1"><strong> <%=game.getAttribute().get("name") %> </strong></a></b>
					<%
					dichden = getSevicesCode(Integer.parseInt(game.getAttribute().get("money").toString()));
					String ua=request.getHeader("User-Agent").toLowerCase();
					if(ua != null){
						ua = ua.toUpperCase();
					}
					if(ua.indexOf("NOKIA") >= 0 || ua.indexOf("SAMSUNG") >= 0 || ua.indexOf("MOTOROLA") >= 0 || ua.indexOf("APPLE") >=0 || ua.indexOf("ANDROID") >=0 || ua.indexOf("IPHONE") >= 0 || ua.indexOf("IPAD") >= 0){
			   		%>
			   		<p>Để <a href="sms:<%=dichden %>?body=<%=game.getAttribute().get("code") %>">Tải về <img src=<%=downloadIcon %>></a> soạn tin: <b class="show"><%=game.getAttribute().get("code")%></b> gửi <b class="show"><%=dichden %></b></p>
			   		<%} 
			   		else
			   		{%>
			   		<p>Để tải về soạn tin: <b class="show"><%=game.getAttribute().get("code")%></b> gửi <b class="show"><%=dichden %></b></p>
					<%}%>
				    </td>
				</tr>
				<%}%>
			</table>
			<%}%>
		</div>
		<!--end .table-->

	</div>
	<!--end .box-->
	<div class="box bottom10 clearfix line">
		<div class="title-normal">
			<h3 class="bg">
				<a href="news.jsp?act=dv" style="font-weight: bold;"> <img src="images/icon_news.png" alt="Tin tức " width="20" height="20" border="0" align="left" />&nbsp;<u>Tin tức >></u></a>
			</h3>
		</div>
		<!--end .title-normal-->

		<div class="table">
			<% gameList = contentDAO.getContentListByType(new BigDecimal("1"), 1, 3);
			if (gameList != null && !gameList.isEmpty()) {%>
			<table cellpadding="0" cellspacing="0" border="1" width="100%">
			<%
				for (DatabaseObject game : gameList) {%>
				<tr>
	
				    <td width="100%" style="vertical-align: top; padding: 5px 2px 5px 4px;">
				        <b><a href="news-detail.jsp?act=dv&catid=<%=game.getAttribute().get("category_id") %>&id=<%=game.getAttribute().get("id") %>&page=1"><strong> <%=game.getAttribute().get("name") %> </strong></a></b>
				    </td>
				</tr>
				<%}%>
			</table>
			<%}%>
		</div>
		<!--end .table-->

	</div>
	<!--end .box-->

<div class="box-menu">
	<h3 class="bg">
		<img src="images/icon-navigation.png" alt="" />
		<a href="dichvu.jsp?act=dv"><b class="clblue"> Dịch vụ khác </b>
		</a>
	</h3>
	<div class="box clearfix" align="center">
		<div class="table" style="padding-bottom: 5px; width:215px;">
			<div style="width: 70px; float: left;" align="center">
				<a href="lottery.jsp?act=dv"> <img src="images/icon-vnzone/icon-lottery.png" alt="Xổ số" /></a>
				<br />
				<a href="lottery.jsp?act=dv" style="color: #1782c1; font-weight: bold;">Xổ số</a>
			</div>
			<div style="width: 70px; float: left;" align="center">
				<a href="football.jsp?act=dv"> <img src="images/icon-vnzone/icon-football.png" alt="Bóng đá" />
				</a>
				<br />
				<a href="football.jsp?act=dv" style="color: #1782c1; font-weight: bold;">Bóng đá
				</a>
			</div>
			<div style="width: 70px; float: left;" align="center">
				<a href="wallpaper.jsp?act=dv"> <img src="images/icon-vnzone/icon-wallpaper.png" alt="Hình nền" />
				</a>
				<br />
				<a href="wallpaper.jsp?act=dv" style="color: #1782c1; font-weight: bold;">Hình nền
				</a>
			</div>
			<div class="clear"></div>
		</div>
		<!--end .table-->

		<div class="table" style="padding-bottom: 5px; width:215px;">
			<div style="width: 70px; float: left;" align="center">
				<a href="sms.jsp?act=dv"> <img src="images/icon-vnzone/icon-sms.png" alt="SMS" />
				</a>
				<br />
				<a href="sms.jsp?act=dv" style="color: #1782c1; font-weight: bold;"> SMS </a>
			</div>
			<div style="width: 70px; float: left;" align="center">
				<a href="clip.jsp?act=dv"> <img src="images/icon-vnzone/icon-videoclip.png" alt="Video Clip" />
				</a>
				<br />
				<a href="clip.jsp?act=dv" style="color: #1782c1; font-weight: bold;">Video Clip</a>
			</div>
			<div style="width: 70px; float: left;" align="center">
				<a href="theme.jsp?act=dv"> <img src="images/icon-vnzone/icon-theme.png" alt="Themes" />
				</a>
				<br />
				<a href="theme.jsp?act=dv" style="color: #1782c1; font-weight: bold;"> Theme
				</a>
			</div>
			<div class="clear"></div>
		</div>
		<!--end .table-->

		<div class="table" style="padding-bottom: 5px; width:215px;" align="center">
			<div style="width: 70px; float: left;" align="center">
				<a href="ringback.jsp?act=dv"> <img src="images/icon-vnzone/icon-ringback.png" alt="Nhạc chờ" /></a>
				<br />
				<a href="ringback.jsp?act=dv" style="color: #1782c1; font-weight: bold;"> Nhạc chờ </a>
			</div>

			<div style="width: 70px; float: left;" align="center">
				<a href="weather.jsp?act=dv"> <img src="images/icon-vnzone/icon-weather.png" alt="Thời tiết" />
				</a>
				<br />
				<a href="weather.jsp?act=dv" style="color: #1782c1; font-weight: bold;"> Thời tiết </a>
			</div>

			<div style="width: 70px; float: left;" align="center">
				<a href="story.jsp"> <img src="images/TuVan.png" alt="Truyện" />
				</a>
				<br />
				<a href="story.jsp?act=dv" style="color: #1782c1; font-weight: bold;">Truyện </a>
			</div>
			<div class="clear"></div>
		</div>
		<!--end .table-->
	</div>
	<!--end .box-->

</div>
<!--end .box-menu-->
<!-- END MAIN CONTENT -->
<%@include file="inc-footter.jsp"%>
